<!DOCTYPE html>
<html>
    <head lang="en">
        <meta charset="UTF-8">
        <meta name="csrf-token" content="{{ csrf_token() }}">
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">	
        <link rel="shortcut icon" type="image/x-icon" href="{{URL::asset('handan/images/logo-icon.png')}}" />
        <title>客户个人中心</title>
        <link rel="stylesheet" href="{{URL::asset('mobile/css/public.css') }}"/>
        <link rel="stylesheet" href="{{URL::asset('mobile/css/customerCenter.css') }}"/> 
        <script src="{{URL::asset('public_js/jquery-3.2.1.min.js')}}"></script>
		<script src="{{URL::asset('mobile/js/public.js') }}"></script>
		<script src="{{URL::asset('mobile/js/customerCenter.js') }}"></script>
		<script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js"> </script>
    </head>
<body>
	<!--头部-->
	<section>
		<div class="setup" >
			<div>
			@if($isself)
			<img src="{{ URL::asset('mobile/image/analystcenter/sz.png') }}" onclick="setup()">
			@endif	
			</div>
		</div>
		<div class="photo">
			<img src="{{session('eai')['photo']}}" alt="" />
		</div>
		<div class="news">
			<div>
				@if($isself)
				<img src="{{ URL::asset('mobile/image/analystcenter/xx.png') }}">
				@endif
				</div>
		</div>
	</section>
	<!--名字介绍-->
	<section>
		<div class="name">
			<p>{{ $userinfo->username}}</p>
			@if($userinfo->isvip != '0')
				<p class="zuanshi"><img src="{{URL::asset('mobile/image/customer/vip.png') }}" alt="" /></p>
			@endif
		</div>
		<!--会员剩余-->
		<div class="member">
			<div>会员剩余</div>
			<div><span style="width: 0%;"></span></div>
			<div class="countdown">
				00小时00天00分
			</div>
		</div>
		<!--策略订阅记录-->
		<div class="follow">
			<div class="hd">
				<p>{{ $allprofit }}<span>点</span></p>
				<p>策略盈利</p>
			</div>
			<div class="gd">
				<p>{{ round($gendanProfit,2) }}<span>点</span></p>
				<p>订阅盈利</p>
			</div>
		</div>
	</section>
	<!--功能区-->
	<section>
		<div>
			<a href="{{url('/management?id=')}}{{$id}}">
				<span></span>
				<span>我的订阅</span>
				<span></span>
			</a>
		</div>
		<div onclick="detail();">
			<a href="javascript:;">
				<span></span>
				<span>我的策略</span>
				<span></span>
			</a>
		</div>
		<div>
			<a href="javascript:;">
				<span></span>
				<span>会员充值</span>
				<span></span>
			</a>
		</div>
		<div>
			<a href="javascript:;">
				<span></span>
				<span>提现管理</span>
				<span></span>
			</a>
		</div>
		<div>
			<a href="tel://400-8088-189">
				<span></span>
				<span>联系客服</span>
				<span></span>
			</a>
		</div>
		<div>
			<a href="javascript:;">
				<span></span>
				<span>帮助中心</span>
				<span></span>
			</a>
		</div>
	</section>
	<section></section>
	@include('mobile.footer')
</body>
</html>
<script>
	function detail(userid) {
		var myhandan = '{{ url("/kmyhandan") }}';
		window.location.href = myhandan+"?userid="+'{{$_GET["id"]}}';
	}
	// 设置
	function setup() {
		var myhandan = '{{ url("/setup") }}';
		window.location.href = myhandan+"?id="+'{{$_GET["id"]}}';
	}
	wx.ready(function () {
		var title = '个人中心';
		var desc  = '让交易变得更智能';
		var link  = '{{ url("/home") }}?id='+'{{$_GET["id"]}}';
		var imgurl = 'http://www.eaifx.com/index/images/minbanner.png';
		// 监听“分享给朋友”，按钮点击、自定义分享内容及分享结果接口
		wx.onMenuShareAppMessage({
			title: title,
			desc: desc,
			link: link,
			imgUrl: imgurl,
			trigger: function (res) {
				// 不要尝试在trigger中使用ajax异步请求修改本次分享的内容，因为客户端分享操作是一个同步操作，这时候使用ajax的回包会还没有返回
//					alert('用户点击发送给朋友');
			},
			success: function (res) {
				alert('已分享');
			},
			cancel: function (res) {
				alert('已取消');
			},
			fail: function (res) {
//                alert(JSON.stringify(res));
				alert('分享失败');
			}
		});

		// 监听“分享到朋友圈”按钮点击、自定义分享内容及分享结果接口
		wx.onMenuShareTimeline({
			title: title,
			link: link,
			imgUrl: imgurl,
			trigger: function (res) {
				// 不要尝试在trigger中使用ajax异步请求修改本次分享的内容，因为客户端分享操作是一个同步操作，这时候使用ajax的回包会还没有返回
//					alert('用户点击分享到朋友圈');
			},
			success: function (res) {
				alert('已分享');
			},
			cancel: function (res) {
				alert('已取消');
			},
			fail: function (res) {
				alert(JSON.stringify(res));
			}
		});

		// 监听“分享到QQ”按钮点击、自定义分享内容及分享结果接口
		wx.onMenuShareQQ({
			title: title,
			desc: desc,
			link: link,
			imgUrl: imgurl,
			trigger: function (res) {
//					alert('用户点击分享到QQ');
			},
			complete: function (res) {
//					alert(JSON.stringify(res));
			},
			success: function (res) {
				alert('已分享');
			},
			cancel: function (res) {
				alert('已取消');
			},
			fail: function (res) {
				alert(JSON.stringify(res));
			}
		});

		// 监听“分享到微博”按钮点击、自定义分享内容及分享结果接口

		wx.onMenuShareWeibo({
			title: title,
			desc: desc,
			link: link,
			imgUrl: imgurl,
			trigger: function (res) {
//					alert('用户点击分享到微博');
			},
			complete: function (res) {
//					alert(JSON.stringify(res));
			},
			success: function (res) {
				alert('已分享');
			},
			cancel: function (res) {
				alert('已取消');
			},
			fail: function (res) {
				alert(JSON.stringify(res));
			}
		});

		// 监听“分享到QZone”按钮点击、自定义分享内容及分享接口
		wx.onMenuShareQZone({
			title: title,
			desc: desc,
			link: link,
			imgUrl: imgurl,
			trigger: function (res) {
//					alert('用户点击分享到QZone');
			},
			complete: function (res) {
//					alert(JSON.stringify(res));
			},
			success: function (res) {
				alert('已分享');
			},
			cancel: function (res) {
				alert('已取消');
			},
			fail: function (res) {
				alert(JSON.stringify(res));
			}
		});
	});
</script>
    	
